{[include file="../../../../library/view/templates/header.tpl"]}
{[include file="../../../../library/view/templates/common.tpl"]}
<script src="{[$host]}/js/goods/goodsWithSupplier.js" type="text/javascript"></script>
<script src="{[$host]}/js/common/categoryTag.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="{[$host]}theme/commonTheme/css/plugins/themes/jquery.ui.all.css" />

        <div id="BMainContents">
        <div class="BSpace10px">
        </div>
        <div id="BMainTitleH1">
            {[$goods_EC0004_H1]}
        </div>
             <div id="BError">{[include file="../../../../library/view/templates/tag/error.tpl"]}</div>
             <div class="BFence">
    <div class="BSpace10px"></div>

       <form id="goodsWithSupplierForm" name="goodsWithSupplierForm" method="post">
            <input type="hidden" id="hidaddEditFg" name="hidaddEditFg" value = "{[$addEditFg]}"/>
       </form>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td>
                        <div class="BFenceTopLeft">
                        </div>
                        <div class="BFenceTopRight">
                        </div>
                    </td>
                </tr>
                <tr>
                  <td class="BFenceSideLine">
                        <div style="border:1px solid #CCC; padding:3px; float:left; width:350px;">
                        {[$goods_EC0004_GoodsCode]}:&nbsp;&nbsp;<input type="text" value="{[$strGoodsCode]}">
                                    <table class="BListTable" width="100%">
                                            <tr>
                                                <td width="16%" class="BListTableHeader">
                                                    NO.
                                                </td>
                                                <td width="47%" class="BListTableHeader">
                                                    {[$goods_EC0004_GoodsName]}
                                                </td>
                                                <td width="20%" class="BListTableHeader">
                                                    {[$goods_EC0004_Operation]}
                                                </td>
                                                <td width="17%" class="BListTableHeader">
                                                    {[$goods_EC0004_Delete]}
                                                </td>
                                          </tr>
                                    </table>
                                        <ul id="Bdragtable">
                                            {[foreach from = $arrSupplierInfo key = k item = msg]}
                                            <li id="Bdragtable{[$msg.SUPPLIER_NO]}" class="ui-state-default">
                                              <table width="100%" border="0" cellpadding="0" cellspacing="0" class="BNoMarginTable">
                                                <tr>
                                                  <td width="51" align="right"><span id="liNo">{[$k+1]}</span></td>
                                                  <td width="174"><div class="Ctxtparagraph" >{[$msg.SUPPLIER_NAME]}</div></td>
                                                  <td width="68">
                                                        <img src="{[$host]}theme/commonTheme/img/ec-icon_up3.gif" onclick="goods_up('Bdragtable{[$msg.SUPPLIER_NO]}')"/>
                                                        <img src="{[$host]}theme/commonTheme/img/ec-icon_down3.gif" onclick="goods_down('Bdragtable{[$msg.SUPPLIER_NO]}')"/>
                                                  </td>
                                                  <td width="31"><img src="{[$host]}theme/commonTheme/img/ec-shop_icon5.gif" onclick="goods_deleteGoods('Bdragtable{[$msg.SUPPLIER_NO]}')" /></td>
                                                  <td width="24" class="BgoodsLinksright"></td>
                                                </tr>
                                              </table>
                                              <input type="hidden" id="hidGoodsSupplierNo{[$msg.SUPPLIER_NO]}"  name="hidGoodsSupplierNo" value="{[$msg.SUPPLIER_NO]}" />
                                              <input type="hidden" id="hidGoodsSupplierName{[$msg.SUPPLIER_NO]}"  name="hidGoodsSupplierName" value="{[$msg.SUPPLIER_NAME]}" />
                                            </li>
                                             {[/foreach]}
                                        </ul>
                        </div>
                        <div class="BClickmoveExplanation">{[$titleH3Lable]}</div>
                        <div style="border:1px solid #CCC; padding:3px; float:right; width:520px;">
                                        <div align="left">
                                          <div class="BLittleTitle">{[$goods_EC0004_SupplierSearch]}</div>
                                        </div>
                                        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="BGrayLineTable">
                                            
                                            <tr>
                                                <td width="95" class="BListLabel">
                                                    {[$goods_EC0004_SupplierName]}
                                                </td>
                                                <td width="314">
                                                    <input id="txtSupplierName" name="txtSupplierName" type="text" size="43%" /></td>
                                                <td width="111" rowspan="3" >
                                                    <div class="BTextAlignCenter">
                                                        <input id="EC0013VW01" name="EC0013VW01" value="{[$goods_EC0004_SearCondition]}" type="button" class="BGrayBtn" onclick = "goods_supplierSearchClick()"/><div class="BSpace10px"></div> 
                                                        <input id="EC0013OT01" name="EC0013OT01" value="{[$goods_EC0004_Clear]}" class="BGrayBtn" type="button" onclick = "goods_conditionClearClick()"/>
                                                    </div>                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="93" class="BListLabel">
                                                   {[$goods_EC0004_SupplierId]}
                                                </td>
                                                <td>
                                                    <input id="txtSupplierId" name="txtSupplierId" type="text"  size="43%"/></td>
                                            </tr>
                                            <tr>
                                                <td width="93" class="BListLabel" >
                                                     {[$goods_EC0004_Prov]}
                                                </td>
                                                <td> 
                                                   <select id="selProv" name="selProv" class="selectable">
                                                    {[foreach from=$arrProv key=key item=item]}
                                                        <option value="{[$item.KEY_CODE]}" {[if $arrSession.ProvCode == $item.KEY_CODE]}selected{[/if]}>{[$item.KEY_NAME]}</option>
                                                    {[/foreach]}
                                                    </select>
                                                </td>
                                            </tr>
                                        </table>
                                        <!--<div class="BSpace10px">
                                        </div>-->
                                       <div class="BSpace20px"></div> 
                                       <table width="100%" border="0" cellspacing="0" cellpadding="0" class="BNoMarginTable">
                                           <tr>
                                                <td  valign="bottom">{[$goodsLable1]}<br/>{[$goodsLable2]}</td>
                                                <td  valign="bottom">
                                                <div align="right" >
                                                    <div id="orderDetail">{[include file="../../../../library/view/templates/tag/order.tpl"]}</div>
                                                </div>
                                                <div align="right" class="BPasingArea" id="pageHead">
                                                    {[include file="../../../../library/view/templates/tag/pager.tpl"]}
                                                </div></td>
                                           </tr>
                                       </table>
                                        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="BGrayLineTable">
                                            <tr align="left" id="trHeader">
                                                <td>
                                                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="BListTable">
                                                        <tr>
                                                          <td class="BListTableHeader" style="width: 10%">
                                                                No.
                                                            </td>
                                                            <td class="BListLabel" style="width: 20%" id="A.SUPPLIER_ID" onclick="initOrder('orderHead');">
                                                                {[$goods_EC0004_SupplierId]}
                                                                {[include file="../../../../library/view/templates/tag/orderView.tpl"]}
                                                            </td>
                                                            <td class="BListLabel" style="width: 30%" id="A.SUPPLIER_NAME" onclick="initOrder('orderHead');">
                                                                {[$goods_EC0004_SupplierName]}
                                                                {[include file="../../../../library/view/templates/tag/orderView.tpl"]}
                                                            </td>
                                                            <td class="BListLabel" style="width: 40%" id="A.PROV_CODE" onclick="initOrder('orderHead');">
                                                                {[$goods_EC0004_Prov]}
                                                                {[include file="../../../../library/view/templates/tag/orderView.tpl"]}
                                                            </td>
                                                        </tr>
                                                  </table>
                                                   <ul id="goodsList">
                                                        {[foreach from = $arrSearchData item = msg key = i]}
                                                                <li id="goodsList{[$msg.SUPPLIER_NO]}" flag="{[$i]}">
                                                                    <table width="100%" class="BListTable">
                                                                    {[if $msg.disableFlag == 1]}
                                                                    <tr id="{[$i]}" flag="1" class="BClickmoveGrayoutOdd" >
                                                                     {[else]}
                                                                    <tr id="{[$i]}" class = "BClickmoveOdd">
                                                                     {[/if]}
                                                                           <td width="10%" align="left" class="title1">
                                                                           <img id="imgDelete" src="{[$host]}theme/commonTheme/img/ec-shop_icon1.gif"/>{[$msg.NO]}
                                                                           </td>
                                                                           <td width="20%" align="left" class="title2 word-break-all">
                                                                               <a href="{[$host]}supplier/supplierView/index/SupplierNo/{[$msg.SUPPLIER_NO]}">{[$msg.SUPPLIER_ID]}</a>
                                                                           </td>
                                                                           <td width="30%" align="left" class="title1">
                                                                               {[$msg.SUPPLIER_NAME]}
                                                                           </td>
                                                                           <td width="40%" align="left" class="title1">
                                                                               {[$msg.PROV_CODE]}
                                                                           </td>
                                                                       </tr>
                                                                   </table>
                                                                       <input type="hidden" id="hidSupplierNo"  name="hidSupplierNo" value="{[$msg.SUPPLIER_NO]}" />
                                                                       <input type="hidden" id="hidSupplierName"  name="hidSupplierName" value="{[$msg.SUPPLIER_NAME]}" />
                                                                </li>
                                                               {[/foreach]}
                                                </ul>
                                            </td>
                                            </tr>
                                        </table>
                                         <div align="right" class="BPasingArea" id="pageFoot">
                                            {[include file="../../../../library/view/templates/tag/pager.tpl"]}
                                         </div>
                             </div>
                      </td>
                    </tr>
                    
                    <tr>
                        <td>
                        <div class="BFenceBottomLeft">                        </div>
                        <div class="BFenceBottomRight">                        </div>
                        </td>
                    </tr>
                </table>
            <div class="BSpace20px">
            </div>
            <div class="BTextAlignCenter">
                <input type="submit" id="EC0013MV01" name="EC0013MV01" class="BGrayBtnMiddle" value="{[$goods_EC0004_Set]}" onclick="goods_GoodsSupplierSaveClick()" />
                <input type="submit" id="EC0013MV01" name="EC0013MV02" class="BGrayBtnMiddle" value="{[$goods_EC0004_Back]}" onclick="goods_back()" />
            </div><div class="BSpace20px"></div>
            <div align="left">
                <a href="javascript:void(0)" onclick="goods_returnClick()">{[$returnValue]}</a></div>
        </div>
        </div>
{[include file="../../../../library/view/templates/footer.tpl"]}